[#ftl]
[#import "macrolibs.ftl" as lib]
[#assign mySimpleClassName][@lib.simpleClassName clazz=clazz/][/#assign]
[#assign myFullClassName]${lib.packageBase}.domain.${mySimpleClassName}[/#assign]

[#assign myModuleName][@lib.moduleName clazz=clazz/][/#assign]
[#assign myModuleNames][@lib.moduleNames clazz=clazz/][/#assign]

[#assign myDomainExtends][@lib.domainExtends clazz=clazz/][/#assign]
[#assign myDomainParams][@lib.domainParaTypes clazz=clazz/][/#assign]

[#assign myControllerExtends][@lib.actionExtends clazz=clazz/][/#assign]

[#if clazz.scopeClass??]
    [#assign myScopeClassName][@lib.simpleClassName clazz=clazz.scopeClass/][/#assign]
    [#assign myScopeModuleName][@lib.moduleName clazz=clazz.scopeClass/][/#assign]
    [#assign myScopePathVariable][@lib.moduleName clazz=clazz.scopeClass/]Id[/#assign]
    [#assign myScopeIdPathVar]@PathVariable("${myScopeModuleName}Id") int scopeId,[/#assign]
[/#if]


[#assign myPageName][@lib.pagingExtends clazz=clazz/][/#assign]
[#assign myPageParam]<[#if clazz.scopeClass??]${myScopeClassName}, [/#if][#if clazz.ownerLevel>0][@lib.ownerClassName level=clazz.ownerLevel/], [/#if]${mySimpleClassName}>[/#assign]


[#assign myAttrJavaTypes={}]
[#assign myAttrNames={}]
[#assign myGetters={}]
[#assign mySetters={}]
[#assign myRefClassNames={}]
[#list clazz.dynaAttributes as attr]
    [#assign javaType][@lib.javatype attr=attr/][/#assign]
    [#assign myAttrJavaTypes=myAttrJavaTypes+{"${attr.id}", javaType}]
    [#assign attrName][@lib.attributeName attr=attr/][/#assign]
    [#assign myAttrNames=myAttrNames+{"${attr.id}", attrName}]
    [#assign getter][@lib.getter attr=attr/][/#assign]
    [#assign myGetters=myGetters+{"${attr.id}", getter}]
    [#assign setter][@lib.setter attr=attr/][/#assign]
    [#assign mySetters=mySetters+{"${attr.id}", setter}]
    [#if attr.type==9]
        [#assign className][@lib.simpleClassName clazz=attr.refClass/][/#assign]
        [#assign myRefClassNames=myRefClassNames+{"${attr.id}", className}]
    [/#if]
[/#list]


